/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FinancialEntity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Sebastian
 */
@Embeddable
public class QuotePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id")
    private int id;
    @Basic(optional = false)
    @Column(name = "Stock_id")
    private int stockid;

    public QuotePK() {
    }

    public QuotePK(int id, int stockid) {
        this.id = id;
        this.stockid = stockid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getStockid() {
        return stockid;
    }

    public void setStockid(int stockid) {
        this.stockid = stockid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) id;
        hash += (int) stockid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof QuotePK)) {
            return false;
        }
        QuotePK other = (QuotePK) object;
        if (this.id != other.id) {
            return false;
        }
        if (this.stockid != other.stockid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.QuotePK[ id=" + id + ", stockid=" + stockid + " ]";
    }
    
}
